const merge = require('webpack-merge');
const common = require('./webpack.common.js');

// 清理输出目录
const CleanWebpackPlugin = require('clean-webpack-plugin');

module.exports = merge(common.generate(true), {
  mode: 'production',
  devtool: 'source-map',
  plugins: [
    new CleanWebpackPlugin([common.OUTPUT_DIR]),
  ]
});